import VueRouter from 'vue-router'
import Login from "@/components/Login.vue";
import Navigate from "@/components/Navigate.vue";
import Welcome from "@/components/MainComponents/Welcome.vue";
import Settings from "@/components/Settings.vue";
import JobTable from "@/components/MainComponents/JobTable.vue";
// import ChinaCharts from "@/components/FormComponents/Charts/ChinaCharts.vue";
import GenMapCharts from "@/components/FormComponents/Charts/VisualMapCharts.vue";
import MapVisual from "@/components/MainComponents/Visual/MapVisual.vue";
import PositionVisual from "@/components/MainComponents/Visual/PositionVisual.vue";
import JobDetail from "@/components/JobDetail.vue";
import PositionDetailVisual from "@/components/MainComponents/Visual/PositionDetailVisual.vue";
import WordCloudVisual from "@/components/MainComponents/Visual/WordCloudVisual.vue";
import PredictSalary from "@/components/MainComponents/PredictSalary.vue";
import Center from "@/components/Center.vue";
import Record from "@/components/MainComponents/Record.vue";

const router = new VueRouter({
    routes: [
        {
            path: '/',
            redirect: "/login"
        },
        {
            path: '/login',
            name: "Login",
            component: Login
        },
        {
            path: '/Home',
            name: "Home",
            component: Navigate,
            children: [
                {
                    path: "/Home/welcome",
                    name: "Welcome",
                    component: Welcome,
                },
                {
                    path: "/Home/settings",
                    name: "Settings",
                    component: Settings,
                },
                {
                    path: "/Home/jobtable",
                    name: "JobTable",
                    component: JobTable,
                },
                {
                    path: "/Home/jobdetail/:jobId",
                    name: "JobDetail",
                    component: JobDetail,
                },
                {
                    path: "/Home/visual/map",
                    name: "MapVisual",
                    component: MapVisual
                },
                {
                    path: "/Home/visual/position",
                    name: "PositionVisual",
                    component: PositionVisual
                },

                {
                    path: "/Home/visual/position/detail",
                    name: "PositionDetailVisual",
                    component: PositionDetailVisual
                },
                {
                    path: "/Home/visual/wordcloud",
                    name: "WordCloudVisual",
                    component: WordCloudVisual
                },
                {
                    path:"/Home/predict/salary",
                    name:"PredictSalary",
                    component:PredictSalary
                },
                {
                    path:"/Home/center",
                    name:"Center",
                    component:Center
                },
                {
                    path:"/Home/record",
                    name:"Record",
                    component:Record
                },

            ]
        },

    ]
})
// 挂载路由导航守卫


export default router
